package com.dennytech.tac.utils;

public interface DataCursor<E> {

	int getCount();

	int getPosition();

	boolean offset(int i);

	boolean move(int i);

	boolean moveToFirst();

	boolean moveToLast();

	boolean moveToNext();

	boolean moveToPrevious();

	E getData();

	void close();

	@SuppressWarnings("rawtypes")
	public static final DataCursor EMPTY_CURSOR = new DataCursor() {
		@Override
		public void close() {
		}

		@Override
		public int getCount() {
			return 0;
		}

		@Override
		public Object getData() {
			return null;
		}

		@Override
		public int getPosition() {
			return -1;
		}

		@Override
		public boolean move(int i) {
			return false;
		}

		@Override
		public boolean moveToFirst() {
			return false;
		}

		@Override
		public boolean moveToLast() {
			return false;
		}

		@Override
		public boolean moveToNext() {
			return false;
		}

		@Override
		public boolean moveToPrevious() {
			return false;
		}

		@Override
		public boolean offset(int i) {
			return false;
		}
	};
}
